package io.yizoo.system.util;

import com.aliyun.credentials.utils.StringUtils;
import org.slf4j.helpers.FormattingTuple;
import org.slf4j.helpers.MessageFormatter;

public class StringUtil extends StringUtils {
    public static String formatStr(String templateStr, String... args) {
        if (StringUtils.isEmpty(templateStr)) {
            return templateStr;
        }
        FormattingTuple formattingTuple = MessageFormatter.arrayFormat(templateStr, args);
        return formattingTuple.getMessage();
    }
}
